<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/axios.min.js"></script>
</head>
<body>
    <div>
        <h2>删除商品</h2>
        <input type="text" placeholder="pid">
        <button>删除</button>
    </div>
    <script>
        let btn = document.querySelector('button')
        const url = 'http://jx.xuzhixiang.top/ap/api/goods/goods-delete.php'
        btn.onclick = () => {
            let pid = document.querySelector('input:nth-child(2)').value
            let uid = 109742
            let token = "c08db5004d34f5b497a1d22eeb315f01"
            axios.get(url, {
                params: {
                    pid, uid, token,
                }
            }).then(function (resolve) {
                console.log(resolve.data);
            }).catch(function (reject) {
                console.log(reject);
            })
        }
    </script>
</body>
</html>